class ComponentsController < ApplicationController
  active_scaffold do |config|
    config.columns = :name, :title, :body, :template, :images, :project, :updated_at
    config.list.columns.exclude :body
    #create.columns.exclude :template, :images

    #columns[:template].form_ui = :record_select
    #columns[:images].form_ui = :record_select
    columns[:template].form_ui = :select
    columns[:project].form_ui = :select
    columns[:images].form_ui = :select

    list.sorting = { :project_id => :desc, :id => :asc }
    #list.columns.exclude :nil
    #create.columns.exclude :nil
    #update.columns.exclude :nil
    #show.columns.exclude :nil
  end

  # active_scaffold callbacks
  def conditions_for_collection()
  end

  def before_create_save(record)
  end

  def after_create_save(record)
  end
  
  def before_update_save(record)
  end

  def after_update_save(record)
  end
end
